module.exports = {
    before: function (browser) {
        // see https://github.com/nightwatchjs/nightwatch/blob/main/examples/globalsModule.js#L12
        browser.globals.waitForConditionTimeout = 5000;
    },

    // skipped test - added "''+"" before function
    'Click example test': ''+function (browser) {

        browser
            .url('https://google.com')
            .waitForElementVisible('input[type=text]')
            .setValue('input[type=text]', 'nightwatch.js')
            .click('input[name="btnK"]', function (result) {
                this.assert.strictEqual(result.status, 0);
            })
            .useXpath()
            .expect.element("(//cite[@role='text'])[1]").text.to.contain('https://nightwatchjs.org');
    },
    'Google navigation test': function (browser) {

        browser
            .url('https://google.com')
            .waitForElementVisible('input[type=text]', 'Input field is visible');
    },
    'Accounts navigation test': function (browser) {

        browser
            .url('https://accounts.google.com')
            .waitForElementVisible('input#identifierId', 'Input field is visible');
    },

    after: function (browser) {
        browser.end();
    }
};